//==================================================
// 作 者：曾浩
// 日 期：2012-03-15
// 描 述：介绍本文件所要完成的功能以及背景信息等等
//==================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreFrame.Core.Orm;

namespace MarchEstate.Manager.BusinesEntity
{
    /// <summary>
    /// 车位，如果一个车位有两辆车则增加一个临时车位
    /// </summary>
	[Serializable]
	[Table(TableName = "WY_Carport", EntityType = EntityType.Table, IsGB = false)]
    public abstract class AbstractCarport : CoreFrame.Business.AbstractBusines
	{
        private string _carPortId;//
		/// <summary>
		/// 
		/// </summary>
        [Column(FieldName = "CarPortId", DataKey = true, IsSingleQuote = true, Match = "Custom:Guid", IsInsert = false)]
        public string CarPortId
		{
            get { return _carPortId; }
            set { _carPortId = value; }
		}

        private string _code;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "Code", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string Code
        {
            get { return _code; }
            set { _code = value; }
        }

		private string _carareacode;//
		/// <summary>
		/// 
		/// </summary>
		[Column(FieldName = "CarAreaCode", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string CarAreaCode
		{
			get { return _carareacode; }
			set { _carareacode = value; }
		}
		private decimal _area;//面积
		/// <summary>
		/// 面积
		/// </summary>
		[Column(FieldName = "Area", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
		public decimal Area
		{
			get { return _area; }
			set { _area = value; }
		}

        private string _ownerId;//
		/// <summary>
		/// 人员ID
		/// </summary>
        [Column(FieldName = "OwnerId", DataKey = false, IsSingleQuote = true, Match = "Custom:Guid", IsInsert = true)]
        public string OwnerId
		{
			get { return _ownerId; }
            set { _ownerId = value; }
		}
		private string _username;//使用人
		/// <summary>
		/// 使用人
		/// </summary>
        [Column(FieldName = "OwnerName", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string OwnerName
		{
			get { return _username; }
			set { _username = value; }
		}
		private string _place;//位置
		/// <summary>
		/// 位置
		/// </summary>
		[Column(FieldName = "Place", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
		public string Place
		{
			get { return _place; }
			set { _place = value; }
		}

        private AbstractOwner _owner;
        /// <summary>
        /// 人员信息
        /// </summary>
        public AbstractOwner Owner
        {
            get { return _owner; }
            set { _owner = value; }
        }
        public abstract bool Save();
        public abstract bool Delete(string _carPortId);

        public abstract AbstractCarport GetCarport(string _code);

        /// <summary>
        /// 获取所有停车位 -1全部
        /// </summary>
        /// <param name="_carAreaCode"></param>
        /// <returns></returns>
        public abstract List<AbstractCarport> GetCarportList(string _carAreaCode);
	}
}